Route parameters are path segments prefixed with : in the route definition and are extracted with @Param(). Query parameters are key-value pairs after the ? in the URL and are extracted with @Query(). Route params identify a specific resource; query params filter, sort, or paginate a collection.
Route params — mandatory resource identifiers that are part of the URL path structure.
Query params — optional modifiers for filtering, sorting, searching, and pagination.
Route params are always strings before transformation — use ParseIntPipe or ParseUUIDPipe.
@Param('key') extracts a single named param; @Param() with no arg injects the entire params object.
@Query('key') extracts a single query value; @Query() with no arg injects the full query object.